From 8decaba8f75d16550d5f0e6caf9ddaff18dad38a Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 3 Dec 2023 18:13:30 +0000 Subject: Support exception handler method break --- ...mpiler.testing.snapshots.Snapshotter)].expected | 31 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected') diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected index 0429c8c6..e23caad0 100644 --- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -20,8 +20,10 @@ Compilation unit elements: ) Locals: - * (val "effectHandler__0" data-ptr) * (val "tmp__0" int) + * (val "effectHandler__0" data-ptr) + * (val "tmp__1" int) + * (val "tmp__2" int) Instructions: @@ -30,8 +32,31 @@ Instructions: (call _ "shed__runtime__effects_set_handler_method" ((local "effectHandler__0") (int 0) (local "handlerC"))) (call _ "shed__runtime__effects_set_handler_method" ((local "effectHandler__0") (int 1) (local "handlerA"))) (call _ "shed__runtime__effects_set_handler_method" ((local "effectHandler__0") (int 2) (local "handlerB"))) - (local-store (local "tmp__0") (int 42)) - (call _ "shed__runtime__effects_pop_handler" ()) + ( + try + ((local "tmp__0")) + ( + ( + catch + "shed__effect__exception__Example_Project__State" + (local "tmp__2") + ( + block + ( + ) + results=((local "tmp__2")) + ) + ) + ) + ( + block + ( + (local-store (local "tmp__1") (int 42)) + (call _ "shed__runtime__effects_pop_handler" ()) + ) + results=((local "tmp__1")) + ) + ) ) Temporary stack: -- cgit v1.2.3